<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

	class Media extends Admin_Controller{
		public function __construct(){
			parent::__construct();
			$this->load->model('database_model');
		}

		public function index(){
			if(!is_user_logged_in()){
				redirect('admin/login','refresh');
			}
			
			// Alert
			$alert = array(
				'alert_type' => 'info',
				'alert_content' => "Welcome to Media!"
				);

			// Media items
			$editor = getView('modules/file-manager','', true);
			// Load Media
			$data = array(
				'header' => 'Media',
				'menu_active' =>"2",
				'alert' => $alert,
				'editor' => $editor
				);
			$this->load->view('media', $data);
		}
	}
?>